#pragma once

namespace Graphics{
	class RenderContext;

	class VertexShader{
	public:
		VertexShader(std::string &filename, RenderContext* handle){
			size_t pos1,pos2;
			std::string subDir;
			if((pos1=filename.find_last_of('\\')) != std::string::npos || (pos2=filename.find_last_of('/')) != std::string::npos){
				if(pos1 != std::string::npos){
					subDir = filename.substr(0,pos1+1);
					filename = filename.substr(pos1+1,filename.size());
				}
				else{
					subDir = filename.substr(0,pos2+1);
					filename = filename.substr(pos2+1,filename.size());
				}
			}

			m_fileName = filename.substr(0,filename.find_last_of('.'));
			filename = Core::GeneralSettings::findFilePath(filename,subDir);
		}
		virtual ~VertexShader(){}

		virtual void setShader(void* context) = 0;

		std::string m_fileName;
	private:
	};

	typedef boost::shared_ptr<VertexShader> VertexShaderPtr;
}